package com.dhnsoft.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Description
 * @ClassName ConstantWxPayUtils
 * @Author dhn
 * @date 2022.04.15 00:11
 */
@Component
public class ConstantWxPayUtils implements InitializingBean {
    @Value("${weixin.pay.appid}")
    private String appid;

    @Value("${weixin.pay.partner}")
    private String partner;

    @Value("${weixin.pay.partnerkey}")
    private String partnerkey;

    @Value("${weixin.pay.notifyurl}")
    private String notifyurl;

    public static String WX_PAY_ID;
    public static String WX_PAY_PARTNER;
    public static String WX_PAY_PARTNER_KEY;
    public static String WX_PAY_NOTIFY_URL;
    @Override
    public void afterPropertiesSet() throws Exception {
        WX_PAY_ID=this.appid;
        WX_PAY_PARTNER=this.partner;
        WX_PAY_PARTNER_KEY=this.partnerkey;
        WX_PAY_NOTIFY_URL=this.notifyurl;
    }
}
